<%@ page contentType="text/html;charset=UTF-8" language="java" trimDirectiveWhitespaces="true" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="X-UA-Compatible" content="edge"/>
    <meta name="apple-mobile-web-app-capable" content="yes"/>
    <meta name="apple-mobile-web-app-status-bar-style" content="black"/>
    <meta name="format-detection" content="telphone=no, email=no"/>
    <meta name="renderer" content="webkit"/>
    <meta name="HandheldFriendly" content="true"/>
    <meta name="MobileOptimized" content="320"/>
    <meta name="screen-orientation" content="portrait"/>
    <meta name="x5-orientation" content="portrait"/>
    <meta name="full-screen" content="yes"/>
    <meta name="x5-fullscreen" content="true"/>
    <meta name="browsermode" content="application"/>
    <meta name="x5-page-mode" content="app"/>
    <meta name="msapplication-tap-highlight" content="no"/>
    <meta content="initial-scale=1.0,maximum-scale=1.0,user-scalable=no" name="viewport"/>
    <title>荩美国际商城</title>
    <link rel="stylesheet" href="/resources/frontcss/zip.touch.member2_0.index.v79216.css" type="text/css" />
    <link rel="stylesheet" type="text/css" href="/resources/frontcss/aui/aui.css" />
    <link rel="stylesheet" type="text/css" href="/resources/frontcss/iconfont/iconfont.css" />
    <link rel="stylesheet" type="text/css" href="/resources/frontcss/iconfont/Yiconfont.css" />
    <script type="text/javascript" src="/resources/js/zepto.min.js"></script>
    <style type="text/css">
        .m_header,
        .body{max-width: 640px;}
        .m_header{left:50%;margin-left: -320px;}
    </style>
    <style type="text/css">
        .rembox{ width:99%; margin:0 auto; display:block; }
        .rembox ul li{  float:left;  padding-left:8px;}
        .rembox ul li{ float:left;line-height: 30px;}
        .rembox ul li h1{ width:100%; float:left; font-size:14px; color:#fff;}
        .rembox ul li h2{ width:100%; float:left; font-size:14px; color:#fff;}
        .rembox ul li p{ width:100%; float:left; font-size:14px; color:#fff; text-align:center;}

    </style>
    <script type="text/javascript">
        function remReSize(){
        var w = $(window).width();
       try{w = $(parent.window).width();}catch(ex){};
       if(w>640){w = 640;};
       $('html').css('font-size',100/640*w+'px');$('#js_style_for_pc').remove();
       $('body').append('<style id="js_style_for_pc">.m_header{margin-left: -'+w/2+'px;}.m_menu{margin-left: -'+w/2+'px;}</style>');
        };
        remReSize();
        $(window).resize(remReSize);$(document).ready(function() {remReSize();});for(var i=0;i<3;i++){setTimeout(remReSize, 100*i);};
    </script>

</head>
<body>
<div class="body" >
    <div class="m_header">
        <p>
            <a class="bt_prev" href="/front/productList">
                <span class="prev rotate45"></span>
                <span class="prev rotate135"></span>
            </a>
        </p>
        <h1 class="ellipsis bt_title">
            会员中心
        </h1>
    </div>

    <div class="lib_content" id="js_lib_content">
        <div class="m_index_header">
            <div class="m_index_info" style="height: 1.9rem;margin:1rem 0 0 1rem;">
                <a class="portrait_box" href="/front/user/info" style="width: 1.2rem;height: 1.2rem;">
                    <img class="portrait_img" src="${user.headimgUrl}" style="width: 1.3rem;height: 1.3rem;"/>
                    <div class="box_bg"></div>
                    <i class="clear"></i>
                </a>
                <div class="portrait_name" style="width:70%;margin-top: 0.01rem;">
                        <span class="ellipsis">
                        <c:if test="${user.type eq 'Gold'}">金牌代理</c:if>
                        <c:if test="${user.type eq 'General' and user.isPartner ne '1'}">全国总代理</c:if>
                        <c:if test="${user.type eq 'General' and user.isPartner eq '1' and user.userLevel eq '0'}">省级合伙人</c:if>
                        <c:if test="${user.type eq 'General' and user.isPartner eq '1' and user.userLevel eq '1'}">副省级合伙人</c:if>
                        <c:if test="${user.type eq 'General' and user.isPartner eq '1' and user.userLevel eq '2'}">地市合伙人</c:if>
                        <c:if test="${user.type eq 'General' and user.isPartner eq '1' and user.userLevel eq '3'}">区县合伙人</c:if>
                        <c:if test="${user.type eq 'Customer'}">普通用户</c:if>
                      </span>
                </div>
                <div onclick="clear"></div>
                <div class="portrait_name" style="width:70%;margin-top: -0.1rem;">
                        <span class="ellipsis" style="max-width: 5rem;">
                       ${user.nickName}(${user.account})</span>
                </div>
                <div onclick="clear"></div>
                <div class="portrait_name" style="width:70%;margin-top: -0.1rem;">
                    <a href="/front/user/money" style="color: #fff;">
                        <span class="ellipsis">
                       余额：${money}
                      </span>
                    </a>
                </div>

                <i class="clear"></i>
            </div>
            <div class="m_operate_bg" style="height: 1.2rem;"></div>
            <div class="m_operate"  style="height: 1.2rem;">
                <Div class="rembox">
                    <ul>
                        <li style="width:49%; "><h1>
                            <a href="/front/user/amount/list?isToday=0"  style="display: initial;">今日收入:${amountSize}</a></h1>
                            <h1><a href="javascript:void(0);" style="display: initial;">历史收入:${total}</a> </h1></li>
                        <li style="width:49%; border-right:none;float:right;">
                            <h1>
                                <a href="/front/user/order/teamOrder?today=0"  style="display: initial;">团队订单:<span id="newOrder" style="font-size: .3rem;">0</span></a>
                            </h1>
                            <h1>
                                <a href="javascript:void(0);" style="display: initial;">订单总数:<span id="orderTotal" style="font-size: .3rem;">0</span></a>
                            </h1></li>
                    </ul>
                </Div>

               <%-- <span style="width: 100%;display: block;color: #fff;">
                   <span style="width: 48%;float:left;text-align: center;"> 历史收入：${total}</span>
                   <span style="width: 48%;float:left;text-align: center;"> 总订单数：<span id="orderTotal">0</span></span>
                </span>
                <br/>
                <a href="/front/user/amount/list?isToday=0">
                    <span  style="font-size: 0.28rem;">今日收入(${amountSize})</span>
                </a>
                <a href="/front/user/order/list?isToday=0">
                    <span  style="font-size: 0.28rem;">今日订单(${orderSize})</span>
                </a>
                <a href="/front/user/money">
                    <span  style="font-size: 0.28rem;">我的资金(${money})</span>
                </a>--%>
            </div>
            <i class="clear"></i>
        </div>

    </div>
        <div class="placeholder"></div><div class="placeholder"></div>
        <ul class="m_list m_list_top_line bg_white p_index_menu">
            <li class="link">
                <a href="/front/user/beforeUpdate">
                    <i class="m_icon m_icon_privilege"></i>
                    我要升级
                    <div class="right">
                        <span class="m_arrow">
                            <i class="rotate45"></i>
                            <i class="rotate135"></i>
                        </span>
                    </div>
                </a>
            </li>
            <li class="link">
                <a href="/front/user/money">
                    <i class="m_icon m_icon_user"></i>
                    我要提现
                    <div class="right">
                        <span class="m_arrow">
                            <i class="rotate45"></i>
                            <i class="rotate135"></i>
                        </span>
                    </div>
                </a>
            </li>
            <li class="link">
                <a href="/front/user/order/list">
                    <i class="m_icon m_icon_order"></i>
                    我的订单
                    <div class="right">
                        查看全部订单
                        <span class="m_arrow">
						<i class="rotate45"></i>
						<i class="rotate135"></i>
					</span>
                    </div>
                </a>
            </li>
        </ul>
        <div class="placeholder"></div>
        <div class="placeholder"></div>
        <ul class="m_list m_list_top_line bg_white p_index_menu">
            <li class="link">
                <a href="javascript:void(0);" onclick="qrcode()">
                    <i class="m_icon m_icon_user"></i>
                    我的二维码
                    <div class="right">

					<span class="m_arrow">
						<i class="rotate45"></i>
						<i class="rotate135"></i>
					</span>
                    </div>
                </a>
            </li>
            <li class="link">
                <a href="/front/user/amount/list">
                    <i class="m_icon m_icon_address"></i>
                    我的收入记录
                    <div class="right">

					<span class="m_arrow">
						<i class="rotate45"></i>
						<i class="rotate135"></i>
					</span>
                    </div>
                </a>
            </li>
            <li class="link">
                <a href="/front/user/amount/flow">
                    <i class="m_icon m_icon_sale"></i>
                    我的资金流水
                    <div class="right">

					<span class="m_arrow">
						<i class="rotate45"></i>
						<i class="rotate135"></i>
					</span>
                    </div>
                </a>
            </li>
        </ul>
        <div class="placeholder"></div>
        <div class="placeholder"></div>
        <ul class="m_list m_list_top_line bg_white p_index_menu">
            <li class="link">
                <a href="/front/user/amount/txList">
                    <i class="m_icon m_icon_user"></i>
                    我的提现申请
                    <div class="right">
                        <span class="m_arrow">
                            <i class="rotate45"></i>
                            <i class="rotate135"></i>
                        </span>
                    </div>
                </a>
            </li>
            <li class="link">
                <a href="/front/user/team/list">
                    <i class="m_icon m_icon_sale"></i>
                    团队业绩
                    <div class="right">
                        <span class="m_arrow">
                            <i class="rotate45"></i>
                            <i class="rotate135"></i>
                        </span>
                    </div>
                </a>
            </li>
            <c:if test="${user.type eq 'General' and user.isPartner eq '1'}">
                <li class="link">
                    <a href="/front/user/team/areaQuery">
                        <i class="m_icon m_icon_privilege"></i>
                        区域业绩
                        <div class="right">
                            <span class="m_arrow">
                                <i class="rotate45"></i>
                                <i class="rotate135"></i>
                            </span>
                        </div>
                    </a>
                </li>
            </c:if>
        </ul>
     <div class="placeholder"></div><div class="placeholder"></div>
        <ul class="m_list m_list_top_line bg_white p_index_menu">
            <li class="link" >
                <a href="/front/user/dlzc">
                    <i class="m_icon m_icon_order"></i>
                    代理政策
                    <div class="right">
                            <span class="m_arrow">
                                <i class="rotate45"></i>
                                <i class="rotate135"></i>
                            </span>
                    </div>
                </a>
            </li>
            <li class="link" >
                <a href="/front/user/cjwt">
                    <i class="m_icon m_icon_help"></i>
                    常见问题
                    <div class="right">
                            <span class="m_arrow">
                                <i class="rotate45"></i>
                                <i class="rotate135"></i>
                            </span>
                    </div>
                </a>
            </li>
        </ul>
        <div class="placeholder"></div><div class="placeholder"></div>

    </div>

</div>
<script type="text/javascript">
    $(function(){
        loadAllOrder();
        loadNewOrder();
    });
    function qrcode(){
        $.ajax({
            url:"/front/user/toQrCode?r="+Math.random(),
            type:"post",
            dataType:"json",
            success:function(res){
                if(res.success){
                    window.location.href = "/front/user/myqrCode";
                }else{
                    alert(res.msg);
                    window.location.href = "/front/productList";
                }
            },
            error:function(){}
        })
    }
    function loadAllOrder(){
        $.ajax({
            url:"/front/user/loadAllOrder?r="+Math.random(),
            type:"post",
            dataType:"json",
            success:function(res){
                if(res.success){
                    $("#orderTotal").html(res.data);
                }
            },
            error:function(){}
        })
    }
    function loadNewOrder(){
        $.ajax({
            url:"/front/user/loadNewOrder?r="+Math.random(),
            type:"post",
            dataType:"json",
            success:function(res){
                if(res.success){
                    $("#newOrder").html(res.data);
                }
            },
            error:function(){}
        })
    }
</script>
</body>
</html>